# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Jan de Groot <jgc@archlinux.org>

pkgname=gnome-calculator
pkgver=3.30.1
pkgrel=1
pkgdesc="GNOME Scientific calculator"
url="https://wiki.gnome.org/Apps/Calculator"
arch=(x86_64)
license=(GPL)
depends=(gtk3 dconf gtksourceview3 mpfr libsoup libmpc)
makedepends=(yelp-tools vala git appstream-glib meson)
groups=(gnome)
options=(!emptydirs)
_commit=269be9ec47ae8bb2c806a3be44d1d524f409131d  # tags/3.30.1^0
source=("git+https://gitlab.gnome.org/GNOME/gnome-calculator.git#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

build() {
  arch-meson $pkgname build
  ninja -C build
}

check() {
  meson test -C build
}

package() {
  DESTDIR="$pkgdir" meson install -C build
}
